home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Comm / www / tidy_os4.lha / tidy / src / clean.h < prev    next >
C/C++ Source or Header  |  2004-07-25  |  3KB  |  97 lines

  1. #ifndef __CLEAN_H__
  2. #define __CLEAN_H__
  3.  
  4. /* clean.h -- clean up misuse of presentation markup
  5.  
  6.   (c) 1998-2003 (W3C) MIT, ERCIM, Keio University
  7.   See tidy.h for the copyright notice.
  8.  
  9.   CVS Info:
  10.     $Author: hoehrmann $ 
  11.     $Date: 2004/03/06 15:53:41 $ 
  12.     $Revision: 1.9 $ 
  13.  
  14. */
  15.  
  16. void RenameElem( Node* node, TidyTagId tid );
  17.  
  18. Node* CleanNode( TidyDocImpl* doc, Node* node );
  19.  
  20. void FreeStyles( TidyDocImpl* doc );
  21.  
  22. /* Add class="foo" to node
  23. */
  24. void AddClass( TidyDocImpl* doc, Node* node, ctmbstr classname );
  25.  
  26. void CleanDocument( TidyDocImpl* doc );
  27.  
  28. /* simplifies <b><b> ... </b> ...</b> etc. */
  29. void NestedEmphasis( TidyDocImpl* doc, Node* node );
  30.  
  31. /* replace i by em and b by strong */
  32. void EmFromI( TidyDocImpl* doc, Node* node );
  33.  
  34. /*
  35.  Some people use dir or ul without an li
  36.  to indent the content. The pattern to
  37.  look for is a list with a single implicit
  38.  li. This is recursively replaced by an
  39.  implicit blockquote.
  40. */
  41. void List2BQ( TidyDocImpl* doc, Node* node );
  42.  
  43. /*
  44.  Replace implicit blockquote by div with an indent
  45.  taking care to reduce nested blockquotes to a single
  46.  div with the indent set to match the nesting depth
  47. */
  48. void BQ2Div( TidyDocImpl* doc, Node* node );
  49.  
  50.  
  51. Node *FindEnclosingCell( TidyDocImpl* doc, Node* node );
  52.  
  53. void DropSections( TidyDocImpl* doc, Node* node );
  54.  
  55. /* used to hunt for hidden preformatted sections */
  56. Bool NoMargins(Node *node);
  57.  
  58. /* does element have a single space as its content? */
  59. Bool IsSingleSpace(Lexer *lexer, Node *node);
  60.  
  61.  
  62. /*
  63.  This is a major clean up to strip out all the extra stuff you get
  64.  when you save as web page from Word 2000. It doesn't yet know what
  65.  to do with VML tags, but these will appear as errors unless you
  66.  declare them as new tags, such as o:p which needs to be declared
  67.  as inline.
  68. */
  69. void CleanWord2000( TidyDocImpl* doc, Node *node);
  70.  
  71. Bool IsWord2000( TidyDocImpl* doc );
  72.  
  73. /* where appropriate move object elements from head to body */
  74. void BumpObject( TidyDocImpl* doc, Node *html );
  75.  
  76. /* This is disabled due to http://tidy.sf.net/bug/681116 */
  77. #if 0
  78. void FixBrakes( TidyDocImpl* pDoc, Node *pParent );
  79. #endif
  80.  
  81. void VerifyHTTPEquiv( TidyDocImpl* pDoc, Node *pParent );
  82.  
  83. void DropComments(TidyDocImpl* doc, Node* node);
  84. void DropFontElements(TidyDocImpl* doc, Node* node, Node **pnode);
  85. void WbrToSpace(TidyDocImpl* doc, Node* node);
  86. void DowngradeTypography(TidyDocImpl* doc, Node* node);
  87. void ReplacePreformattedSpaces(TidyDocImpl* doc, Node* node);
  88. void NormalizeSpaces(Lexer *lexer, Node *node);
  89. void ConvertCDATANodes(TidyDocImpl* doc, Node* node);
  90.  
  91. void FixAnchors(TidyDocImpl* doc, Node *node, Bool wantName, Bool wantId, Bool xmlId);
  92. void FixXhtmlNamespace(TidyDocImpl* doc, Bool wantXmlns);
  93. void FixLanguageInformation(TidyDocImpl* doc, Node* node, Bool wantXmlLang, Bool wantLang);
  94.  
  95.  
  96. #endif /* __CLEAN_H__ */
  97.